fix(workflow): safely remap plugins during cross-environment import - #1611
fix(workflow): safely remap plugins during cross-environment import#1611whyiug wants to merge 1 commit into
Conversation
Signed-off-by: whyiug <whyiug@hotmail.com>
FenjuFu
left a comment
There was a problem hiding this comment.
Verified against #1603. The importer preserves direct-ID behavior, safely remaps only a unique compatible plugin in the current personal or space scope, preserves workflow wiring, and reports unresolved mappings for manual action. Permission isolation, ambiguity, compatibility, and legacy-YAML behavior are covered. Full CI, CodeQL, DCO, and CLA are green; I also ran the 18-test WorkflowExportService suite plus Maven Spotless and Checkstyle locally. No blocking issues found.
|
Reviewed against #1603 — the design matches all three expectations in the issue: automatic remap to the target environment's resource ID, directly usable after import, and explicit reporting of nodes that could not be mapped instead of silent failure. Failing closed on ambiguous matches rather than guessing is the right call. One blocker before this can move: the branch is currently CONFLICTING with 已按 #1603 的验收点逐条核对:自动映射到目标环境资源 ID、导入后可直接调试发布、无法映射时明确提示失败节点 —— 三点都满足;对歧义匹配采取 fail-closed 而不是猜测,处理得当。 合并前的唯一阻塞项:当前分支与 |
|
谢谢你帮忙复核,也谢谢提醒冲突。我准备 rebase 时重新对照了最新 继续 rebase #1611 需要手工合并几乎所有核心文件,还会让 所以这里不再 force-push,我先按已被 #1623 完整取代关闭。感谢你的认真 review,也感谢对 fail-closed 方案的认可。 |
Summary
This fixes the cross-environment workflow import problem described in #1603. A plugin's
toolIdis local to one deployment, so importing the YAML into another environment used to drop the binding even when an equivalent plugin was already available there.The importer still prefers the original ID. If that ID is unavailable, it now remaps only when there is exactly one compatible plugin in the current personal or space scope. Ambiguous or incompatible matches stay unbound and are reported to the user instead of being guessed.
Type of Change
Related Issue
Closes #1603
Changes
pluginId,operationId,appId, version and derived inputs), or fail closed without leaving a partial bindingWorkflowresponse shapeTesting
Ran locally with Java 21 and Node.js 20:
mvn testThe repository's full TypeScript check still reports pre-existing errors across unrelated files; the CI workflow treats that step as non-blocking, and none of the errors point to the files changed here.
Screenshots (if applicable)
Not included. The UI change is an import warning that only appears when plugin remapping cannot be done safely.
Checklist
实现过程中使用了 OpenAI Codex(GPT-5)辅助分析调用链和补充测试。我逐项审阅了代码、权限边界和测试结果,并对这次提交负责。